package com.designed.pattern.behavioral.observer;

/**
 * @author yifei
 * @description
 * @date 2024/1/11
 **/
public class BinaryObserver extends Observer{
    public BinaryObserver(Subject subject){
        this.subject = subject;
        this.subject.binding(this);
    }

    @Override
    void update() {
        System.out.println("bin: " + Integer.toBinaryString(subject.getState()));
    }
}
